\section{Planning}


\subsection{Answer 1}
\begin{itemize}
\item $FlyPrecond(p, f, to, s) = At(p, f, s) \wedge Plane(p) \wedge Airport(f) \wedge Airport(to)$

\item $At(p, x, Result(a, s)) \Leftrightarrow$ \\
\verb#   #$(a = Fly(p, f, x) \wedge FlyPrecond(p, f, x, s)) \vee $ \\ 
\verb#   #$At(p, x, s) \wedge (\neg (a = Fly(p, f, x)) \vee \neg FlyPrecond(p, f, x, s))$

\item $At(p, x, Result(a, s)) \Leftrightarrow$ \\
\verb#   #$(a = (Fly(p, f, x) \wedge FlyPrecond(p, f, x, s)) \vee (Teleport(p, f, x) \wedge \neg Warped(p))) \vee$ \\
\verb#   #$(At(p,x,s) \wedge (\neg (a = Fly(p, f, x) \vee \neg FlyPrecond(p, f, x, s) \vee \neg Teleport(p, x', x)))$
\end{itemize}


\subsection{Answer 2}
\begin{description}
\item[A)] A litteral must appear in all levels, beacause it will always have some state. If a litteral does not appear in the final level
it will by that definition not be in any other level. Thus it will not be achieveable.

\item[B)] Because the graph is serial, there will always be only one next action for each state. Thus, the first time a 
state $S_i$ is achieved, the cost $i$ will be the cheapest to get to that state; by definion
there can not be any cheaper way to that same state.
\end{description}


\subsection{Question 3}
\subsubsection{Forward state planing}
A forward state planning algorithm maintains a partial-plan as a linear tree of actions with the initial-state as it's root. It refines the plan by growing the tree with
applicable actions. Applicable actions are all actions who's {\sc Preconditions} are met.

Thus we can say that this is a form of a partial-plan since we start with a root-node/state and grow the tree with actions.

\subsubsection{Backward state planing}
A backward state plan is the reverse of forward state. Instead of the inial-state at the root, it uses the goal-state. Thus the tree will be a reverse tree of actions, using the inverse of each action to build the tree. The refinement operator is to grow the tree with actions that are compatible with the root-node, that is, the goal.

Thus we can say that this is a form of a partial-plan since we start with a root-node/state and grow the tree with actions.
